import request from '@/utils/request'
import { memberApi } from '@/utils/comm'

// 查询列表
export function listCertificateTrainingObtain(query) {
  return request({
    url: `${memberApi}/certificateTrainingObtain/list`,
    method: 'get',
    params: query
  })
}

// 查询详情
export function getCertificateTrainingObtain(id) {
  return request({
    url: `${memberApi}/certificateTrainingObtain/` + id,
    method: 'get'
  })
}

// 开始培训
export function toBeginTraining(data) {
  return request({
    url: `${memberApi}/certificateTrainingObtain/toBeginTraining`,
    method: 'put',
    data: data
  })
}

// 结束培训
export function toEndTraining(data) {
  return request({
    url: `${memberApi}/certificateTrainingObtain/toEndTraining`,
    method: 'put',
    data: data
  })
}